home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 51
/
051.d81
/
magazine catalog
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
8KB
|
219 lines
5 iff=1 then 60
10 rem - setup -
30 clr:dim ef,e$,t,s,a$,a,oa,q,ec,ke$,ke,ms$,fe
40 x=500:s$=chr$(13):dim mt$(x),mi$(x),ma$(x),mp$(x),aa$(x),at$(x),mc$(x)
50 gosub 4000
55 iff=0 then f=1:load"get'n store.o",8,1
60 open15,8,15:open2,8,2,"0:catalog,s,r":q=1
70 gosub90:if ef<>62 then goto1120
80 close2:ms$="[195][210][197][193][212][197] [206][197][215] [195][193][212][193][204][207][199]":goto720
90 input#15,ef,e$,t,s:return
100 print" [208]ress ([211][208][193][195][197]) to continue. " :g=0
101 :
102 geta$:ifa$<>" "then102
110 poke53280,.:poke53281,.
111 gosub1470
120 printtab(15)"[205][193][201][206] [205][197][206][213]":print"[158] 1. [195]hoose by name of magazine"
130 print" 2. [195]hoose by month/year"
135 print" 3. [195]hoose by name of article"
140 print" 4. [195]hoose by author's name"
145 print" 5. [195]hoose by article subject"
150 print" 6. [195]heck all entries":print" 7. [193]ppend to catalog"
160 print" 8. [197]dit catalog":print" 9. [209]uit to [204][207][193][196][211][212][193][210]"
170 print"[145] [197]nter choice (1-9):";
180 sys32768,1,4+128,ke$:ifke$=""orke$=" "then 110
181 if ke$<"1"orke$>"9"then printchr$(20);:goto 180
190 ke=val(ke$):on ke goto200,280,360,440,520,600,700,830,630
200 rem ---
210 gosub1470
220 printtab(7)"[211]earch by name of magazine":q=0
230 print"[206]ame of magazine":sys32768,25,7,tm$
240 gosub1480
250 q=q+1:if q>a then1490
260 if left$(mt$(q),len(tm$))<>tm$then240
270 gosub1500:goto240
280 rem - month/year -
290 gosub1470
300 printtab(9)"[211]earch by month/year":q=0
310 print"[205]onth/[217]ear:";:sys32768,7,12,tm$
320 gosub1480
330 q=q+1:if q>a then1490
340 if left$(mi$(q),len(tm$))<>tm$then320
350 gosub1500:goto320
360 rem - name of article -
370 gosub1470
380 printtab(13)"[211]earch by name of article":q=0
390 print"[206]ame of article :";:sys32768,25,7,tm$
400 gosub1480
410 q=q+1:if q>a then1490
420 if left$(ma$(q),len(tm$))<>tm$then400
430 gosub1500:goto400
440 rem - author's name -
450 gosub1470
460 printtab(8)"search by author's name":q=0
470 print"[193]uthor's name";:sys32768,25,7,tm$
480 gosub1480
490 q=q+1:if q>a then1490
500 if left$(aa$(q),len(tm$))<>tm$then480
510 gosub1500:goto480
520 rem - article subject -
530 gosub1470
540 printtab(8)"[211]earch by article subject":q=0
550 print"[193]rticle subject: ";:sys32768,25,7,tm$
560 gosub1480
570 q=q+1:if q>a then1490
580 if left$(at$(q),len(tm$))<>tm$then560
590 gosub1500:goto560
600 q=0:rem - search entire list -
610 q=q+1:if q>a then1490
620 print"[147]":gosub1170:gosub1250:goto610
630 rem - quit -
640 print"[147]"
650 printtab(12)"[209]uit to [204][207][193][196][211][212][193][210]"
660 printtab(10)"[193]re you sure? ([217]/[206])";
665 sys32768,4,1+128,ke$:ifke$=""thenprint"":goto 650
670 if ke$="[217]"then690
671 if ke$="[206]"then110
680 printchr$(20);:goto 665
690 poke53281,6:poke53280,14:print"[147][154]":printchr$(142):close15
691 open15,8,15,"r0:hello connect=hello connect":input#15,er,er$:close15
692 if er<>63 then print"[147]":end
693 load"hello connect",8
700 rem - append to catalog -
710 ms$="[193][208][208][197][206][196] [212][207][160][195][193][212][193][204][207][199]":a=oa
720 gosub1470:printtab(11)ms$:a=a+1
730 print"[158][197]nter name of magazine":print":";:sys32768,25,7,mt$(a)
740 print"[158][197]nter month/year":print":";:sys32768,7,12,mi$(a)
750 print"[158][197]nter title of article":print":";:sys32768,25,7,ma$(a)
760 print"[158][197]nter page of article":print":";:sys32768,7,12,mp$(a)
770 print"[158][197]nter author's name":print":";:sys32768,25,7,aa$(a)
780 print"[158][197]nter article subject":print":";:sys32768,25,7,at$(a)
790 print"[158][197]nter comments on article":print" :";:sys32768,38,15,mc$(a)
800 print"[158] [201]s this correct? ([217]/[206])"
801 getke$:ifke$=""then 801
802 ifke$="y"orke$="[217]"then810
803 ifke$="n"orke$="[206]"thena=a-1:goto720
805 goto 801
810 print"[145][196]o you wish to enter another? ([217]/[206])"
811 getke$:ifke$=""then 811
812 if ke$="y"orke$="[217]"then 720
813 if ke$="n"orke$="[206]"then gosub 1020 :goto110
815 goto 811
830 rem - edit catalog -
840 q=0:hm$=""
850 gosub1470:printtab(15)"[197][196][201][212] [195][193][212][193][204][207][199]":q=q+1:if q>a then990
860 gosub1170:poke781,22:poke782,2:sys65520
870 print"[208]ress [[197]] to edit or [[195]] to continue"
880 print" listing. [200]it [154][[209]] to quit."
890 get ke$:if ke$=""then890
900 if ke$="c"then850
910 if ke$="q"then1000
920 if ke$<>"e"then890
930 fe=1
935 print"[208]ress [211][208][193][195][197] to edit line - [210]eturn skips"
940 print" "
950 printhm$+"";:le=25:fu=7:a$=mt$(q):gosub9000:mt$(q)=a$
951 printhm$+"";:le=7:fu=12:a$=mi$(q):gosub9000:mi$(q)=a$
952 printhm$+"";:le=25:fu=7:a$=ma$(q):gosub9000:ma$(q)=a$
953 printhm$+"";:le=5:fu=7:a$=mp$(q):gosub9000:mp$(q)=a$
954 printhm$+"";:le=25:fu=7:a$=aa$(q):gosub9000:aa$(q)=a$
955 printhm$+"";:le=25:fu=7:a$=at$(q):gosub9000:at$(q)=a$
956 printhm$+"":le=80:fu=15:a$=mc$(q):gosub9000:mc$(q)=a$
980 q=q-1:goto850
990 print"[147][211]orry! [212]here are no more entries.":forw=1to2000:next
1000 iffe=1thenfe=0:gosub1020:goto 110
1010 goto110
1020 rem - save catalog to disk -
1030 print#15,"s0:catalog":ec=19:gosub1510
1040 open2,8,2,"0:catalog,s,w":ec=19:gosub1510
1050 print#2,a
1060 for q=1 to a
1070 print#2,mt$(q)s$mi$(q)s$ma$(q)s$mp$(q)s$aa$(q)s$at$(q)s$mc$(q)s$
1080 next q:ec=19:gosub1510:close2
1090 print"[147][195]atalog saved. [208]ress a key to continue."
1100 get ke$:if ke$=""then1100
1110 return
1120 rem - get catalog from disk -
1130 input#2,a$:a=val(a$):oa=a:for q=1 to a
1140 input#2,mt$(q),mi$(q),ma$(q),mp$(q),aa$(q),at$(q),mc$(q)
1150 next q:ec=0:gosub1510:close2
1160 ifq=0 then goto110
1161 goto100
1170 rem - print list -
1180 sp$=" ":print" [205]agazine:[158]":printsp$mt$(q)
1190 print" [205]onth/[217]ear:[158]":printsp$mi$(q)
1200 print" [193]rticle name:[158]":printsp$ma$(q)
1210 print" [208]age of article:[158]":printsp$mp$(q)
1220 print" [193]uthors name:[158]":printsp$aa$(q)
1230 print" [193]rticle subject:[158]":printsp$at$(q)
1240 print" [195]omments:[158]":printsp$mc$(q):return
1250 print" [208]ress [[195]] to continue listing or"
1260 print" press [154][[208]] to print or [[209]] to quit"
1270 print" searching and return to menu."
1280 ke$="":get ke$:if ke$=""then goto1280
1290 if ke$="c"then return
1300 if ke$="p"then gosub 1330:return
1310 if ke$="q"then goto110
1320 goto1280
1330 rem - print to printer -
1331 open16,4,15:close16:ifst<>0 then 8000
1340 open 3,4,7
1350 print#3,"[205]agazine--------:";mt$(q)
1360 print#3,"[205]onth/year------:";mi$(q)
1370 print#3,"[193]rticle name----:";ma$(q)
1380 print#3,"[208]age of article-:";mp$(q)
1390 print#3,"[193]uthors name----:";aa$(q)
1400 print#3,"[193]rticle subject-:";at$(q)
1410 print#3,"[195]omments--------:";mc$(q)
1420 print#3:print#3:close 3
1430 print" [208]ress any key to continue."
1440 get ke$:if ke$=""then1440
1450 return
1460 rem - subroutines -
1470 print"[147] [158] [204][207][193][196][211][212][193][210] [208]resents.."
1471 print" [205]agazine [193]rticle [195]ataloger"
1475 return
1480 print"[147] [159][208]lease wait...[211]earching.":return
1490 print"[147] [211]earch is finished.":forw=1to1500:next:goto110
1500 print"[147] [198]ound a match.":gosub1170:gosub1250:return
1510 gosub90:if ef>ec then print"[196][201][211][203] [197][210][210][207][210] #"ef;e$:close2:close15:end
1520 return
4000 poke53265,(peek(53265)and239):poke53280,11:poke53281, 0:print"[147]";
4001 print"[155]e # 36 Softdisk issue # 51 Big Blue Disk issu[158] ";
4002 print" [155]ig Blue Disk[158] Loadstar Presents [152]s[155]ue # 19 Loa[158] [163][163][163][163][163][163]";
4003 print"[163][163][163][163][163][163][163][163][163][163][163] [152]s[155]ue # 31 Soft[152]disk issue # 53 Loadstar iss[155]ue